<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
 <title>添加配送方式</title>
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
 <script src="__APP__/statics/jquery-1.9.1.min.js" type="text/javascript"></script>
<style>
body{font-family:"微软雅黑";font-size:"12px"}
h1{font-size:"20px";}
h2{font-size:"16px"}:
</style>

<form method="POST" action="__URL__/add_ex">
<table border="0" width="800" style="border: 1px solid #C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
	<tr>
		<td align="right" width="109">配送方式：</td>
		<td colspan="3"><input type="text" name="name" size="20"></td>
	</tr>
	<tr>
		<td align="right" width="109">首重：</td>
		<td width="96"><select size="1" name="one_w">
		<option value="500">500g</option>
		<option value="1000" selected>1公斤</option>
		<option value="1500">1.5公斤</option>
		</select></td>
		<td align="right" width="117">续重：</td>
		<td width="223"><select size="1" name="two_w">
		<option value="500">500g</option>
		<option value="1000" selected>1公斤</option>
		<option value="1500">1.5公斤</option>
		</select></td>
	</tr>
	<tr>
		<td align="right" width="109">首重费用：</td>
		<td width="96"><input type="text" name="onefee" size="20"></td>
		<td align="right" width="117">续重费用：</td>
		<td width="223"><input type="text" name="twofee" size="20"></td>
	</tr>
	<tr>
	    <td align="right" width="109">类型：</td>
		<td width="436" colspan="3">
		     <input type="radio" value="3" checked name="type">自提
		     <input type="radio" value="1" checked name="type">统一配置费用
			 <input type="radio" value="2" name="type">按地区配置
		</td>
	</tr>
	<tr>
		<td align="right" width="109">　</td>
		<td width="436" colspan="3">　
		         <div id="province"></div>
		</td>
	</tr>
	<tr>
		<td align="right" width="109">配送介绍：</td>
		<td width="436" colspan="3"><textarea rows="5" name="intro" cols="50"></textarea></td>
	</tr>
	<tr>
		<td colspan="4" align="right">
		<p align="center"><input type="submit" value="添加" name="B1"></td>
	</tr>
</table>
</form>

<div id="coo" style="display:none">
<table border="0" width="424px" style="border: 1px solid #C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
	             <tr>
		             <td align="center">地区</td>
		             <td align="center">首重费用</td>
		             <td align="center">续重费用</td>
	            </tr>
<?php if(is_array($area)): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$area): $mod = ($i % 2 );++$i;?><tr>
		            <td align="center"><?php echo ($area["local_name"]); ?><input type="text" name="area[]" size="20" value="<?php echo ($area["local_name"]); ?>" style="display:none"></td>
		            <td align="center"><input type="text" name="one_fee[]" size="20"></td>
		            <td align="center"><input type="text" name="two_fee[]" size="20"></td>
	            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </table>

</div>


<script>
$("[name=type]").click(function(){
   var va=$("[name=type]:checked").val();
   if(va=='2'){
   $("#province").append($("#coo").html());
   }else{
   $("#province").empty();
   }

})

</script>